package com.loto.insurance.oem.web.db.mapper;

import java.util.List;
import java.util.Map;

import com.loto.insurance.oem.web.entity.PolicyInfoTravel;

public interface PolicyInfoTravelMapper {

  long insertPolicyInfo(PolicyInfoTravel policyInfo);

  int updatePolicyFeeStatusByOrderId(Map<String, Object> params);

  int updatePolicyFeeStatusById(Map<String, Object> params);

  int updatePolicyStatusByOrderId(Map<String, Object> params);

  int updatePolicyStatusById(Map<String, Object> params);

  List<PolicyInfoTravel> findPolicyInfoById(long orderId);

  // 投保成功，根据对外订单号和订单ID更新支付成功或投保失败的保单信息
  int updatePolicyByOutOrderNoOrderId(Map<String, Object> params);

  // 根据对外订单号和订单ID更新保单状态
  int updatePolicyStatusByOutOrderNoOrderId(Map<String, Object> params);

  // 根据对外订单号和订单ID获取保单ID
  PolicyInfoTravel findPolicyInfoByOutOrderNoOrderId(Map<String, Object> params);

  // 根据订单ID和保单订单获取能退款的保单对外订单号
  PolicyInfoTravel findCanRefundPolicyInfoOrderId(Map<String, Object> params);
}
